home *** CD-ROM | disk | FTP | other *** search
/ The X-Philes (2nd Revision) / The X-Philes Number 1 (1995).iso / xphiles / hp48hor2 / phi.doc < prev    next >
Text File  |  1995-03-31  |  1KB  |  31 lines

  1.            PHI by Joseph K. Horn   --  A Number Theory tool. 
  2.               Calculates PHI(x), Euler's totient function. 
  3.  
  4. +-------------------------------------------------------------------------+ 
  5. | NOTE:  This program calls FACTOR, a program by Jurjen NE Bos, available | 
  6. | on EduCALC Goodies Disk #2.  You must be in the FACTOR directory when   | 
  7. | you upload ALLF, or it will not work.                                   | 
  8. +-------------------------------------------------------------------------+ 
  9.  
  10.  
  11. PHI(x) is defined as the number of integers between 1 and x that are 
  12. relatively prime to x (i.e. share no prime factors with x). 
  13.  
  14. For example, since 15 is relatively prime to 1, 2, 4, 7, 8, 11, 13 and 
  15. 14 (8 numbers), PHI(15) is 8. 
  16.  
  17. By convention, 1 is neither a prime nor a composite, and is therefore 
  18. considered relatively prime to everything.  Thus PHI(1)=1. 
  19.  
  20. PHI of anything less than 1 yields 0. 
  21.  
  22. The number of primitive roots of x is exactly equal to PHI(PHI(x)). For 
  23. example, to see that 351 has 72 primitive roots, type 351 and press PHI 
  24. twice.  This means that there are 72 numbers between 1 and 351 which are 
  25. relatively prime to 351.  Anything that can be described in terms of 
  26. close-range random but long-range patterns can be modeled by primitive 
  27. root cycles.  The applications of this range from the SpiroGraph child's 
  28. toy to the mathematics of Chaos Theory. 
  29.  
  30. -Joseph K. Horn-    -Peripheral Vision, Ltd.- 
  31.